#include "favoritesitemeditdialogimpl.h"
#include "ui_favoritesitemeditdialog.h"

using namespace ExecTerminalImplNS;

FavoritesItemEditDialogImpl::FavoritesItemEditDialogImpl(QWidget * parent): QDialog(parent)
{
    theUI = new Ui::FavoritesItemEditDialog;
    theUI->setupUi(this);
}

FavoritesItemEditDialogImpl::~FavoritesItemEditDialogImpl()
{
    delete theUI;
}

void FavoritesItemEditDialogImpl::setItemPixmap(const QPixmap & pix)
{
    theUI->thePictureLabel->setPixmap(pix);
}

void FavoritesItemEditDialogImpl::setItemPath(const QString & path)
{
    theUI->thePathLabel->setText(path);
}

void FavoritesItemEditDialogImpl::setItemName(const QString & name)
{
    theUI->theNameEdit->setText(name);
}

QString FavoritesItemEditDialogImpl::itemName()const
{
    return theUI->theNameEdit->text();
}

void FavoritesItemEditDialogImpl::setItemURL(const QString & url)
{
    theUI->theAddressEdit->setText(url);
}

QString FavoritesItemEditDialogImpl::itemURL()const
{
    return  theUI->theAddressEdit->text();
}

void FavoritesItemEditDialogImpl::setUrlEditorVisible(bool editorVisible)
{
    theUI->theAddressEdit->setVisible(editorVisible);
    theUI->theUrlLable->setVisible(editorVisible);
}


